const React = require('react');
const {
  View,
  StyleSheet,
} = require('react-native');
const {
  JDNoDataView,
  JDRouter,
} = require('@areslabs/jdreact-core-lib');
const { NavigationBar } = JDRouter;

class JDNoDataViewExample extends React.Component {
  render() {
    return (
      <View style={styles.wrapper}>
        <NavigationBar Title="暂无数据" />
        <JDNoDataView message="暂无晒单数据" buttonText="返回首页" buttonOnClick={this.buttonOnClick} />
      </View>
    );
  }

  buttonOnClick = () => {
    alert('返回首页')
  };
}

const styles = StyleSheet.create({
  wrapper: {
    flex: 1,
  },
});

module.exports = JDNoDataViewExample;
